package com.test;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

import javax.swing.JOptionPane;


public class test2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

			String sql="SELECT kurs_biezacy FROM notowania";
		    

		    try {
		        Class.forName("com.mysql.jdbc.Driver");
		        Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/BROKER","root","");
		        Statement stmt=con.createStatement();
		        ResultSet rs = stmt.executeQuery(sql);
		        String kurs = null;
		        String all = "";
		       while (rs.next())
		      {
	        //list sql
		    	   
		    	   kurs = rs.getString("kurs_biezacy");
		    	   all+=kurs+';';
		    	   System.out.println(kurs);
		             
		      }
		       //teraz to moznawyslac kolejka
		       System.out.println(all);
		       parse par = new parse();
		       par.parsing(all);
		    }
		    catch(Exception e) {
		    
		    }

	}

}
